/*
 * @Author: yangmiaomiao
 * @Date: 2021-09-14 11:56:37
 * @LastEditors: yangmiaomiao
 * @LastEditTime: 2021-10-14 16:37:53
 * @Description:
 */
// 患者类型
const BEFORE_BREAKFAST = '早餐前'
const AFTER_BREAKFAST = '早餐后'
const BEFORE_LAUNCH = '午餐前'
const AFTER_LAUNCH = '午餐后'
const BEFORE_DINNER = '晚餐前'
const AFTER_DINNER = '晚餐后'
const BEFORE_SLEEP = '睡前'

//餐前+睡前
const BEFORE_RANGE = [
	{
		value: '低血糖',
		level: 1,
		min: -Infinity,
		max: 3.9,
		sendColor: [{
			offset: 0,
			color: '#236CC0' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#309BD8' // 100% 处的颜色
		}]
	},
	{
		value: '偏低',
		level: 2,
		min: 3.9,
		max: 4.4,
		sendColor: [{
			offset: 0,
			color: '#329DFF' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#32C1FF' // 100% 处的颜色
		}]
	},
	{
		value: '正常',
		level: 3,
		min: 4.4,
		max: 7,
		sendColor: [{
			offset: 0,
			color: '#23C0A4' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#50D6B9' // 100% 处的颜色
		}]
	},
	{
		value: '偏高',
		level: 4,
		min: 7,
		max: 19.05,
		sendColor: [{
			offset: 0,
			color: '#FFC501' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#FF9A01' // 100% 处的颜色
		}]
	},
	{
		value: '严重',
		level: 5,
		min: 19.05,
		max: Infinity,
		sendColor: [{
			offset: 0,
			color: '#F78720' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#F72020' // 100% 处的颜色
		}]
	},
]
//餐后
const AFTER_RANGE = [
	{
		value: '低血糖',
		level: 1,
		min: Number('-Infinity'),
		max: 3.9,
		sendColor: [{
			offset: 0,
			color: '#236CC0' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#309BD8' // 100% 处的颜色
		}]
	},
	{
		value: '偏低',
		level: 2,
		min: 3.9,
		max: 4.4,
		sendColor: [{
			offset: 0,
			color: '#329DFF' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#32C1FF' // 100% 处的颜色
		}]
	},
	{
		value: '正常',
		level: 3,
		min: 4.4,
		max: 10,
		sendColor: [{
			offset: 0,
			color: '#23C0A4' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#50D6B9' // 100% 处的颜色
		}]
	},
	{
		value: '偏高',
		level: 4,
		min: 10,
		max: 19.05,
		sendColor: [{
			offset: 0,
			color: '#FFC501' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#FF9A01' // 100% 处的颜色
		}]
	},
	{
		value: '严重',
		level: 5,
		min: 19.05,
		max: Infinity,
		sendColor: [{
			offset: 0,
			color: '#F78720' // 0% 处的颜色
		}, {
			offset: 1,
			color: '#F72020' // 100% 处的颜色
		}]
	},
]
//测量时段
export const diningTimeArr = [
	{
		code: 11,
		name: BEFORE_BREAKFAST,
		start: '04:00',
		end: '09:00',
		minScope: 4.4,
		maxScope: 7.0,
		scope: '4.4 ~ 7.0',
		range: BEFORE_RANGE,
	},
	{
		code: 12,
		name: AFTER_BREAKFAST,
		start: '09:00',
		end: '10:30',
		minScope: 4.4,
		maxScope: 10.0,
		scope: '4.4 ~ 10.0',
		range: AFTER_RANGE,
	},
	{
		code: 21,
		name: BEFORE_LAUNCH,
		start: '10:30',
		end: '12:00',
		minScope: 4.4,
		maxScope: 7.0,
		scope: '4.4 ~ 7.0',
		range: BEFORE_RANGE,
	},
	{
		code: 22,
		name: AFTER_LAUNCH,
		start: '12:00',
		end: '15:00',
		minScope: 4.4,
		maxScope: 10.0,
		scope: '4.4 ~ 10.0',
		range: AFTER_RANGE,
	},
	{
		code: 31,
		name: BEFORE_DINNER,
		start: '15:00',
		end: '17:30',
		minScope: 4.4,
		maxScope: 7.0,
		scope: '4.4 ~ 7.0',
		range: BEFORE_RANGE,
	},
	{
		code: 32,
		name: AFTER_DINNER,
		start: '17:30',
		end: '20:30',
		minScope: 4.4,
		maxScope: 10.0,
		scope: '4.4 ~ 10.0',
		range: AFTER_RANGE,
	},
	{
		code: 41,
		name: BEFORE_SLEEP,
		start: '20:30',
		end: '24:00',
		minScope: 4.4,
		maxScope: 7.0,
		scope: '4.4 ~ 7.0',
		range: BEFORE_RANGE,
	},
	{
		code: 41,
		name: BEFORE_SLEEP,
		start: '00:00',
		end: '04:00',
		minScope: 4.4,
		maxScope: 7.0,
		scope: '4.4 ~ 7.0',
		range: BEFORE_RANGE,
	},
]